Data synchronization is a process of establishing consistency among data from a source device to a target data storage and vice versa. The data synchronization process maintains a continuous harmonization of the data among the source device and the target storage over time. The process can be utilized in a variety of applications, including file synchronization and mobile device synchronization.
For instance, cloud storage is used for data synchronization for computing devices such as mobile devices. A cloud storage can be a networked storage where data is stored not only in the user's computer, but in virtualized pools of storage which are generally hosted by remote servers or clusters. The mobile devices may synchronize data (e.g. files) via the cloud storage.
The data or file synchronization among the devices can be either one-way or two-way. In one-way synchronization (also referred to as mirroring), updated files or data are copied from a source location to one or more target locations (e.g. locations on a separate device), but no files or data are copied back to the source location. In two-way file synchronization, updated files or data are copied in both directions, usually with the purpose of keeping the two locations identical to each other. The term synchronization generally refers to two-way synchronization in this application.
There may be conflicts detected during the synchronization. Conflicts are situations where a file or a data set has been modified on both sources with different content, as opposed to where it has only been modified on one. Undetected conflicts can lead to overwriting copies of the file with the most recent version, causing data loss. For conflict detection, the synchronization process generally needs to keep a database of the synchronized files.
Cloud storage services, e.g. Dropbox or Google Drive, change the file names to avoid conflicts. For instance, if two user accounts change the same file at the same time, when the cloud storage synchronized that file between these two user accounts, the cloud storage does not try to merge the changes directly. Instead, the cloud storage saves the original file as well as a second version which has the same name but is appended with additional characters (e.g. “conflicted copy”). The cloud storage may further change the file name with the name of the user account or computer responsible for the change, and the date the conflict occurred.
However, by preserving two conflicted files with different file names, a user needs to manually decide which file among the conflicted files is the version he intended to maintain or use. By preserving the conflicted files, the cloud storage ensures the intended version not to be overwritten; such a solution requires the user to make the judgment later for each occasion of synchronization conflict.